package com.homedo.microservice.open.service.gateway.alert.gateway.bean.po.enhanced;

import com.homedo.common.dao.bean.po.enhanced.base.BaseEnhanced;
import com.homedo.microservice.open.service.gateway.alert.gateway.bean.enums.forzuulfilter.ProgressEnum4ZuulFilter;
import com.homedo.microservice.open.service.gateway.alert.gateway.bean.enums.forzuulfilter.StatusEnum4ZuulFilter;
import com.homedo.microservice.open.service.gateway.alert.gateway.bean.po.ZuulFilter;
import org.springframework.beans.BeanUtils;

/**
 * @author 作者 jgshun
 * @date 创建时间 2018年09月10日 16时28分40秒
 */
public class ZuulFilterEnhanced extends BaseEnhanced {

    public ZuulFilterEnhanced(ZuulFilter zuulFilter) {

        BeanUtils.copyProperties(zuulFilter, this);

        //自动生成 细微误差自己调整

        if (zuulFilter.getStatus() != null) {
            this.status = StatusEnum4ZuulFilter
                    .getStatusEnumByCode(zuulFilter.getStatus().shortValue());
        }
        if (zuulFilter.getProgress() != null) {
            this.progress = ProgressEnum4ZuulFilter
                    .getProgressEnumByCode(zuulFilter.getProgress().shortValue());
        }
    }

    public ZuulFilterEnhanced() {
    }

    private Integer id;
    private String applicationName;
    private String filterId;
    private Integer revision;
    private StatusEnum4ZuulFilter status;
    private ProgressEnum4ZuulFilter progress;
    private String filterCode;
    private String filterType;
    private String filterName;
    private String disablePropertyName;
    private Integer filterOrder;
    private java.util.Date createTime;
    private java.util.Date updateTime;
    private String comment;


    private ConfigEnhanced zuulFilterDisableConfEnhanced;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getApplicationName() {
        return applicationName;
    }

    public void setApplicationName(String applicationName) {
        this.applicationName = applicationName;
    }

    public String getFilterId() {
        return filterId;
    }

    public void setFilterId(String filterId) {
        this.filterId = filterId;
    }

    public Integer getRevision() {
        return revision;
    }

    public void setRevision(Integer revision) {
        this.revision = revision;
    }

    public StatusEnum4ZuulFilter getStatus() {
        return status;
    }

    public void setStatus(StatusEnum4ZuulFilter status) {
        this.status = status;
    }

    public ProgressEnum4ZuulFilter getProgress() {
        return progress;
    }

    public void setProgress(ProgressEnum4ZuulFilter progress) {
        this.progress = progress;
    }

    public String getFilterCode() {
        return filterCode;
    }

    public void setFilterCode(String filterCode) {
        this.filterCode = filterCode;
    }

    public String getFilterType() {
        return filterType;
    }

    public void setFilterType(String filterType) {
        this.filterType = filterType;
    }

    public String getFilterName() {
        return filterName;
    }

    public void setFilterName(String filterName) {
        this.filterName = filterName;
    }

    public String getDisablePropertyName() {
        return disablePropertyName;
    }

    public void setDisablePropertyName(String disablePropertyName) {
        this.disablePropertyName = disablePropertyName;
    }

    public Integer getFilterOrder() {
        return filterOrder;
    }

    public void setFilterOrder(Integer filterOrder) {
        this.filterOrder = filterOrder;
    }

    public java.util.Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(java.util.Date createTime) {
        this.createTime = createTime;
    }

    public java.util.Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(java.util.Date updateTime) {
        this.updateTime = updateTime;
    }


    public ConfigEnhanced getZuulFilterDisableConfEnhanced() {
        return zuulFilterDisableConfEnhanced;
    }

    public void setZuulFilterDisableConfEnhanced(ConfigEnhanced confEnhanced) {
        this.zuulFilterDisableConfEnhanced = zuulFilterDisableConfEnhanced;

    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }
}